# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test08
# Description:  例25.9
# Author:       ASUS
# Date:         2019/4/8
#-------------------------------------------------------------------------------


import pandas as pd
scientists = pd.DataFrame({
    'Name':['Rosaline Franklin','Willian Gosset'],
    'Occupation':['Chemist','Statistician'],
    'Born':['1920-07-25','1876-06-13'],
    'Died':['1958-04-16','1937-10-16'],
    'Age':[37,61]},columns=['Occupation','Born','Died','Age'],
index=['Rosaline Franklin','William Gosset'])
print(scientists)
print("------------------------------")
first_row = scientists.loc['Rosaline Franklin']
print(type(first_row))
print("----------------")
print(first_row)
print("-----------------------")
#获取列名
print(first_row.index)
print("----------------")
print(first_row.index[0])
print(first_row.keys())
print("-------------")
print(first_row.values)
